|
In computer science, a computer program specifies behavior that is eventually invoked, causing that behavior to be exhibited by a running program. Hence, a program has a lifetime that includes distinct phases, starting with the editing of the code that specifies the behavior, and extending through execution, which exhibits the specified behavior. The main phases of a program's lifecycle include edit time, compile time, distribution time, installation time, link time, load time, and run time. It is important to be aware that these phases do not necessarily happen in a linear order. Rather, they can be intertwined in various ways. For example, during development of the program, edit time and compile time are often performed repeatedly, without any link, load, or execution. ==Phases== Edit time (or Design time) is the phase during which the code of the program is being edited. During this phase, the code may not be in a consistent state. The editing is typically performed by a human programmer, but can also be performed by a program-generator, design tool, or by a meta-programming system. Compile time is the phase during which the edited source code is translated into machine code by a compiler. During this phase, the compilation system, for many languages, checks the consistency of the source code. For example, a type system is used to define the interface of a function, procedure, etc, and the compilation system checks that the values given to a function match the interface. The result of compilation is an executable file. Distribution time is the phase during which the program is sent from the entity that created it, to an entity that will invoke it. The distribution format is typically an executable file, but may also be source code, especially in the case of a program written in an interpreted language. The means for distribution varies, from physical media such as floppy-disks or CD-ROM, to online download via the internet. Installation time is the phase occurring just after distribution. Typically, a program is received into a system that must perform some form of installation process. The installation process makes the program available to be executed within the system. The installation process is free to invoke different phases of a programs lifecycle. For example, an executable may be analyzed and re-compiled during installation in order to improve the execution on the particular hardware of the system being installed on. Link time is the phase during which the names of implementations are looked up and connected together. For example, a program that invokes libraries does so by stating the name of the library and stating an interface of the library. It is during link time that the particular implementation of that interface is connected to the program that invokes it. This connection may be done prior to execution (static linking) inside the compilation system, or during the installation process; or at or during execution (dynamic linking) as part of starting execution, or even invoked during the execution. Load time is the phase during which an executable image is taken from its stored form, and placed into active memory, as part of starting execution. Run time is the phase during which the behavior of the program is exhibited. Programs then either terminate normally or abnormally (crash), and may be restarted, such as for operating system services or critical servers. 抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)』 ■ウィキペディアで「Program lifecycle phase」の詳細全文を読む スポンサード リンク
|